<!DOCTYPE html>
<html lang="zh-CN">
    <head>
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
        <!-- <meta name="viewport" content="width=device-width, initial-scale=1"> -->
        <title>EZFM</title>
        <link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
    </head>
    <body>
        <audio  id="my_audio" src="https://gitee.com/vanvenj/ezfm/raw/master/audio/1.mp3" ></audio>

        <div class="container-fluid">
            <div class="main">
                <div class="row">
                    <div class="col-xs-12 col-sm-12 col-md-12 col-lg-10">
                        <div>
                            <p>
                            将下面的按钮拖到浏览器书签，点击按钮执行即可。
                            </p>
                        </div>
                        <div>
                            <a type="button" class="btn btn-primary" href="javascript:(function(){if(typeof(addtask) !== 'undefined'){ console.log('already loaded'); addtask(); }else{ var script = document.createElement('SCRIPT'); script.src = 'https://gitee.com/vanvenj/ezfm/raw/dev/core.js'; script.type = 'text/javascript'; script.onload = function() { console.log('loaded success'); addtask(); }; document.getElementsByTagName('head')[0].appendChild(script);} })();" > 设置自动刷新(DEV)</a>
                            <a type="button" class="btn btn-primary" href="javascript:(function(){if(typeof(addtask) !== 'undefined'){ console.log('already loaded'); addtask(); }else{ var script = document.createElement('SCRIPT'); script.src = 'https://gitee.com/vanvenj/ezfm/raw/master/core.js'; script.type = 'text/javascript'; script.onload = function() { console.log('loaded success'); addtask(); }; document.getElementsByTagName('head')[0].appendChild(script);} })();" > 设置自动刷新 </a>
                            <a type="button" class="btn btn-warning" href="javascript:(function(){clearInterval(parseInt(setIntervalId));})();"> 关闭自动刷新 </a>
                        </div>
                        <br/>
                        <div>
                            <img src='output.gif'></img>
                        </div>
                    </div>
                </div>
            </div>
        </div>


        <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
        <script>
            /*
            //var audio = new Audio('https://gitee.com/vanvenj/ezfm/raw/master/audio/1.mp3');
            //audio.play();
            function p(){
                document.getElementById("my_audio").play();
            }
            window.onload=function() {
                p();
                document.body.addEventListener('click', p);
                document.body.addEventListener('touchend', p);
            };
            $(document).ready(function() {
                $("#my_audio").get(0).play();
            });
            */

        </script>
    </body>
</html>
